home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST5-1.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  657b  |  36 lines

  1. ;
  2. ; *** Listing 5-1 ***
  3. ;
  4. ; Copies a byte via AH endlessly, for the purpose of
  5. ; illustrating the complexity of a complete understanding
  6. ; of even the simplest instruction sequence on the PC.
  7. ;
  8. ; Note: This program is an endless loop, and never exits!
  9. ;
  10. ; Compile and link as a standalone program; not intended
  11. ; for use with the Zen timer.
  12. ;
  13. mystack    segment    para stack 'STACK'
  14.     db    512 dup(?)
  15. mystack    ends
  16. ;
  17. Code    segment word public 'CODE'
  18.     assume    cs:Code, ds:Code
  19. Start    proc    near
  20.     push    cs
  21.     pop    ds
  22.     jmp    Skip
  23. ;
  24. i    db    1
  25. j    db    0
  26. ;
  27. Skip:
  28.     rept    1000
  29.     mov    ah,ds:[i]
  30.     mov    ds:[j],ah
  31.     endm
  32.     jmp    Skip
  33. Start    endp
  34. Code    ends
  35.     end    Start
  36.